
#ifndef  xfloat_t
    #error "xfloat_t not defined"
    #define xhas_error
#endif

#ifndef  xlibc_function
    #error "xlibc_function not defined"
    #define xhas_error
#endif

#ifndef  xmixc_function
    #error "xmixc_function not defined"
    #define xhas_error
#endif

#ifndef xhas_error
    xfloat_t expect      = {};
    xfloat_t actually    = {};
    xassert_eq(xlibc_function(0), xmixc_function((xfloat_t)0.0));

    expect          = xlibc_function(+8.7721324676061840E-001);
    actually        = xmixc_function(+8.7721324676061840E-001);
    xassert_fe(expect, actually);

    xfloat_t step        = 1.0;
    xfloat_t v           = 1.0;

    for(ixx i = 0; i < 256; i++, step *= 1.5){
        v           = 123456789101112 * step;
        expect      = xlibc_function(v);
        actually    = xmixc_function(v);
        xassert_fe(expect, actually, v);

        v           = -123456789101112 * step;
        expect      = xlibc_function(v);
        actually    = xmixc_function(v);
        xassert_fe(expect, actually, v);
    }

    for(ixx i = -128; i < 128; i++, step *= 0.5){
        v           = 123456789101112 * step;
        expect      = xlibc_function(v);
        actually    = xmixc_function(v);
        xassert_fe(expect, actually, v);

        v           = -123456789101112 * step;
        expect      = xlibc_function(v);
        actually    = xmixc_function(v);
        xassert_fe(expect, actually, v);
    }

    for(ixx i = -2048; i < 2048; i++){
        v           = inc::pi / 127 * i + 0.01;
        expect      = xlibc_function(v);
        actually    = xmixc_function(v);
        xassert_fe(expect, actually, v);
    }

    #undef  xfloat_t
    #undef  xlibc_function
    #undef  xmixc_function
#else
    #undef  xhas_error
    #undef  xfloat_t
    #undef  xlibc_function
    #undef  xmixc_function
#endif
